package bairui.international.console.web.controller.classes.classes;

import javax.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lianjing.sh.spring.web.controller.base.action.Action;
import com.lianjing.sh.spring.web.controller.enhance.output.FomatOutput;

import bairui.international.model.domain.jpa.TB_Classes;
import bairui.international.service.Service_Classes;

/**
 *
 * 编辑
 *
 * @generated
 * 
 * @see STest_C_ClassesClasses_Edit_Edit 测试
 *
 */
@Controller
public class C_ClassesClasses_Edit_Edit
 extends SC_ClassesClasses_Edit_Edit 
{
	
	@Autowired private Service_Classes service_Classes;
	
	/**
	 * 编辑
	 */
	@Action(Edit.class)
	@PutMapping(Edit.RequestMappingValue)
	public @FomatOutput @ResponseBody Object edit(
		@Valid Edit.InputModel input
	) throws Exception {
		TB_Classes bean = service_Classes.findFirst();
		Long id = bean.getId();
		service_Classes.updateWithNonNullProperties(id, input);
		//
		return null;
	}
	

}
